Add units concept for modulable functions of a repository#742
Merged
lunny merged 7 commits intogo-gitea:masterfrom Feb 4, 2017
Merged
Add units concept for modulable functions of a repository#742lunny merged 7 commits intogo-gitea:masterfrom
lunny merged 7 commits intogo-gitea:masterfrom
Conversation
avelino
reviewed
Jan 25, 2017
models/repo.go
Outdated
| LowerName: strings.ToLower(opts.Name), | ||
| Description: opts.Description, | ||
| IsPrivate: opts.IsPrivate, | ||
| /*EnableWiki: true, |
There was a problem hiding this comment.
Why keep commented code? Git can handle it.
routers/repo/setting.go
Outdated
| log.Trace("Repository wiki deleted: %s/%s", ctx.Repo.Owner.Name, repo.Name) | ||
|
|
||
| repo.EnableWiki = false | ||
| /*repo.EnableWiki = false |
avelino
approved these changes
Jan 25, 2017
Member
|
LGTM |
ethantkoenig
suggested changes
Jan 27, 2017
| RepoID int64 `xorm:"INDEX(s)"` | ||
| Type int `xorm:"INDEX(s)"` | ||
| Index int | ||
| Config map[string]string `xorm:"JSON"` |
Member
There was a problem hiding this comment.
Would it be better to have the keys of RepoUnit.Config be an enum type instead of string literals? I see two advantages to using an enum:
- We don't need to have "magic" string literals in our code. It is easy to accidentally mistype something like
"ExternalTrackerFormat", and the compiler won't tell you if you do. - When the
RepoUnit.Configfield is converted to JSON to store in the database, the generated JSON object will have shorter fields, and thus will use up less disk space.
Member
|
build error |
Member
Author
|
done. |
appleboy
approved these changes
Feb 3, 2017
Member
|
LGTM |
Member
Author
|
@ethantkoenig please confirm. |
ethantkoenig
approved these changes
Feb 4, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR, I create a new abstract thing unit. An unit is a function for a repository. Every unit will have a tab UI on repository home page. For example,
Codeis an unit,Issuesis another. Currently, we have 9 unit types. If #733 is merged, then we will have a new unitReviews. Unit concept will be a basis for many further features in future.